/*
 * Copyright (C) 2017-2021
 * All rights reserved, Designed By
 * Copyright authorization contact 18814114118
 */
package com.shop.cereshop.business.dao.order;

import com.shop.cereshop.commons.domain.order.CereOrderProduct;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface CereOrderProductDAO extends BaseMapper<CereOrderProduct> {

    int insertSelective(CereOrderProduct record);

    CereOrderProduct getByWriteOffCode(@Param("writeOffCode") String writeOffCode);

    int updateWriteOff(@Param("orderId") Long orderId,
                           @Param("skuId") Long skuId,
                           @Param("newCount") int newCount,
                           @Param("writeOffCode") String writeOffCode);
}
